package com.wswy.wzcx.module.validator

import com.che.libcommon.utils.optional.function.Consumer
import com.wswy.wzcx.model.resp.CaptchaData

class PassValidator(private val data: CaptchaData?) : IValidator {


    override fun startVerify(ticketConsumer: Consumer<ValidatorResult>?) {

        data?.ticket?.let {
            ticketConsumer?.consume(ValidatorResult(IValidator.PASS,it))
        }?:kotlin.run {
            ticketConsumer?.consume(null)
        }
    }

    override fun onDestroy() {
    }
}